package mvp.hibernate.demo.model;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by user on 29.06.2014.
 */
public class Player {
    private long id;
    private int level;
    private String name;
    private Set events = new HashSet();
    private Set phones = new HashSet();
    private Money money;

    public Player(int level, String name, Money money) {
        this.level = level;
        this.name = name;
        this.money = money;
    }

    public Player() {
    }

    public long getId() {
        return id;
    }

    public int getLevel() {
        return level;
    }

    public String getName() {
        return name;
    }

    protected void setId(long id) {
        this.id = id;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set getEvents() {
        return events;
    }

    protected void setEvents(Set events) {
        this.events = events;
    }

    public Set getPhones() {
        return phones;
    }

    protected void setPhones(Set phones) {
        this.phones = phones;
    }

    public void addEvent(Event event) {
        events.add(event);
    }

    public Money getMoney() {
        return money;
    }

    public void setMoney(Money money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "Player{" +
                "id=" + id +
                ", level=" + level +
                ", name='" + name + '\'' +
                ", events=" + events +
                ", phones=" + phones +
                ", money=" + money +
                '}';
    }
}
